#include "junix.h"

int ireadline (register char *p, register int n)
{
	char c;
	while (n-- > 0)	{
		if (read (0, &c, 1) <= 0)
			return (-1);
		c &= 0177;
		if (c == '\n' || c == '\r')	{
			*p = '\0';
			return (0);
		}
		*p++ = c;
	}
	return (-1);
}


int main(int argc, char **argv)
{
	char buf[LINE_MAX];
	ireadline( buf, LINE_MAX);
	exit(0);
}

